#include "widget.h"
#include "ui_widget.h"
#include<QResizeEvent>
#include<QDebug>
Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    ui->label->setGeometry(0,0,1022,791);
    QPixmap qp(":/donk.jpg");
    ui->label->setPixmap(qp);
    ui->label->setScaledContents(true);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::resizeEvent(QResizeEvent *event)
{
    ui->label->setGeometry(0,0,event->size().width(),event->size().height());
    qDebug()<<event->size();
}

